package com.itany.boot.controller;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {

    @RequestMapping("/add")
    public String add(){
        System.out.println("UserController.add");
        return "<h1>Hello add</h1>";
    }

    @RequestMapping("/remove")
    public String remove(){
        System.out.println("UserController.remove");
        return "<h1>Hello remove</h1>";
    }

    @RequestMapping("/modify")
    public String modify(){
        System.out.println("UserController.modify");
        return "<h1>Hello modify</h1>";
    }

    @RequestMapping("/findAll")
    public String findAll(){
        System.out.println("UserController.findAll");
        return "<h1>Hello findAll</h1>";
    }

    @RequestMapping("/find/{id}")
    public String findById(@PathVariable("id") Integer id){
        System.out.println("UserController.findById");
        return "<h1>Hello findById</h1>";
    }



}
